$.ajax({
  method: 'get',
  url: '/api/list123'
});

function fn(){
  let x = xx;
}

setTimeout(()=>{
  fn()
},1000)
